//
//  ChatNoticecell.swift
//  app_rn_frontend
//
//  Created by wanghui on 2018/5/30.
//  Copyright © 2018年 Facebook. All rights reserved.
//

import UIKit

class ChatNoticecell: ChatBaseCell {

    @IBOutlet weak var createTimeLabel: WHLabel!
    @IBOutlet weak var noticeContentLabel: WHLabel!
    
    @IBOutlet weak var noticecontentConstraint: NSLayoutConstraint!
    override func awakeFromNib() {
        super.awakeFromNib()
        self.selectionStyle = UITableViewCell.SelectionStyle.none
      self.createTimeLabel.paddingLeft = 5
      self.createTimeLabel.paddingRight = 5
      self.createTimeLabel.layer.cornerRadius  = 5
      self.createTimeLabel.layer.masksToBounds = true
      self.noticeContentLabel.layer.cornerRadius = 5
      self.noticeContentLabel.layer.masksToBounds = true
      self.noticeContentLabel.paddingLeft = 5
      self.noticeContentLabel.paddingRight = 5
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
  
     override func setup(model: ChatMessage) {
       super.setup(model: model)
       self.noticeContentLabel.text = model.text
       self.createTimeLabel.isHidden = !model.showTimeLabel
       self.createTimeLabel.text = model.timeStr
  }
  
}
